home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / dev / amos / AMOS1097.lzh / AMOSLIST / 000197_amos-request@svcs1.digex.net_Mon Oct 20 18:46:36 1997.msg < prev    next >
Internet Message Format  |  1997-11-02  |  5KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail3.access.digex.net (8.8.5/8.8.5) with ESMTP id SAA22239
  3.     for <mcox@access.digex.net>; Mon, 20 Oct 1997 18:46:35 -0400 (EDT)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id OAA10211
  6.     for amos-out; Mon, 20 Oct 1997 14:51:58 -0400 (EDT)
  7. Received: from mail3.access.digex.net (mail3.access.digex.net [205.197.247.4])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id OAA10208
  9.     for <amos-list@svcs1.digex.net>; Mon, 20 Oct 1997 14:51:57 -0400 (EDT)
  10. Received: from leary.huron.net (root@leary.huron.net [205.150.207.2])
  11.     by mail3.access.digex.net (8.8.5/8.8.5) with ESMTP id OAA21374
  12.     for <amos-list@access.digex.net>; Mon, 20 Oct 1997 14:51:56 -0400 (EDT)
  13. Received: from golden.net (ppp31-ts1-kw.huron.net [205.150.207.80])
  14.     by leary.huron.net (8.8.5/8.8.5) with SMTP id OAA00685
  15.     for <amos-list@access.digex.net>; Mon, 20 Oct 1997 14:48:16 -0400
  16. From: "Mr. Giark To You" <joehick@golden.net>
  17. To: AMOS List <amos-list@access.digex.net>
  18. Date: Mon, 20 Oct 1997 14:44:41 -0500
  19. Message-ID: <yam7232.2095.4163168@huron.net>
  20. X-Mailer: YAM 1.3.3 - Amiga Mailer by Marcel Beck
  21. Subject: CD32
  22. MIME-Version: 1.0
  23. Content-Type: text/plain
  24. Status: O
  25. X-Status: 
  26.  
  27. 'As requested, here is my set of CD32 Pad procedures. Feel free to use them
  28. 'for your own programs. The CD32 Pad procedure uses the same values as the
  29. 'Joy(X) command for the CD32_TEXT procedure, which allows you to use a
  30. 'standard joystick for entry as well.
  31.  
  32. 'Test the test entry procedure
  33.  
  34. Locate 0,0 : Print "Up/Down to select, Left to delete, Right to enter, Fire
  35. when done"
  36.  
  37. CD32_TEXT[8,32,20] : TXT$=Param$
  38.  
  39. Print "text entered: ";TXT$
  40. Wait 60
  41.  
  42. 'Test the CD32 buttons
  43.  
  44. Do
  45. PAD : CD32=Param
  46. Clw : Home
  47. If CD32 and 1 Then Print "Up ";
  48. If CD32 and 2 Then Print "Down ";
  49. If CD32 and 4 Then Print "Left ";
  50. If CD32 and 8 Then Print "Right ";
  51. If CD32 and 16 Then Print "Red ";
  52. If CD32 and 32 Then Print "Blue ";
  53. If CD32 and 64 Then Print "Green ";
  54. If CD32 and 128 Then Print "Yellow ";
  55. If CD32 and 256 Then Print "Rewind ";
  56. If CD32 and 512 Then Print "Fast Forward ";
  57. If CD32 and 1024 Then Print "Pause ";
  58. Loop
  59.  
  60. Procedure PAD
  61. PAD:
  62. CD=0 : CD32=0
  63. Lib Open 3,"lowlevel.library",40
  64. Dreg(0)=1
  65. CD=Lib Call(3,-30)
  66. If CD and 1 Then CD32=CD32+%1000 : Rem Right
  67. If CD and 2 Then CD32=CD32+%100 : Rem Left
  68. If CD and 4 Then CD32=CD32+%10 : Rem Down
  69. If CD and 8 Then CD32=CD32+%1 : Rem Up
  70. If CD and 131072 Then CD32=CD32+%10000000000 : Rem Pause
  71. If CD and 262144 Then CD32=CD32+%100000000 : Rem Rewind
  72. If CD and 524288 Then CD32=CD32+%1000000000 : Rem Fast Forward
  73. If CD and 1048576 Then CD32=CD32+%1000000 : Rem Green
  74. If CD and 2097152 Then CD32=CD32+%10000000 : Rem Yellow
  75. If CD and 4194304 Then CD32=CD32+%10000 : Rem Red
  76. If CD and 8388608 Then CD32=CD32+%100000 : Rem Blue
  77. Lib Close 3
  78. End Proc[CD32]
  79.  
  80. Procedure CD32_TEXT[TX,TY,IN]
  81. CHAR$="" : CHAR=0 : A$="" : IN$="" : PAD=0
  82.  
  83. 'You can add characters to the set by including them in CHAR$
  84.  
  85. CHAR$="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,.!?() 1234567890"
  86. CHAR=1
  87. Curs Off 
  88. CD32:
  89.  
  90. 'If you have added characters, make sure the 69 is set to the length of
  91. 'your character string.
  92.  
  93. If CHAR<1 Then CHAR=69
  94. If CHAR>69 Then CHAR=1
  95. A$=Mid$(CHAR$,CHAR,1)
  96. B$=IN$+A$+" "
  97. Ink 7,0 : Text TX,TY,B$
  98. CD32A:
  99. Do : PAD=0 : PAD : PAD=Param : If PAD=0 Then Loop
  100.  
  101. 'To use a joystick instead, replace the above line with:
  102. 'Do : PAD=Joy(0) : If PAD=0 Then Loop
  103.  
  104. If Len(IN$)=IN Then Goto CD32A
  105. If PAD and 2 Then CHAR=CHAR-1 : Wait 5 : Goto CD32
  106. If PAD and 1 Then CHAR=CHAR+1 : Wait 5 : Goto CD32
  107. If PAD and 16
  108.  IN$=IN$+A$
  109.  Text TX,TY,IN$
  110.  Goto CD32B
  111. End If 
  112. If PAD and 4 Then IN$=Left$(IN$,Len(IN$)-1) : Wait 15 : Goto CD32
  113. If PAD and 8 Then IN$=IN$+A$ : Wait 10 : Goto CD32
  114. Goto CD32A
  115. CD32B:
  116. End Proc[IN$]
  117.  
  118. 'TX and TY are graphic coordinates for the text. IN is the allowed length of
  119. 'the string to be entered. The text procedure returns the string as a
  120. parameter
  121. 'and uses the PAD procedure for its input.
  122.  
  123. 'Up  scrolls forward through the character set. Down scrolls back through the
  124. 'character set. Left deletes the current character. Right moves to the next
  125. 'character. Red (Fire) ends input.
  126.  
  127. Well met and godspeed,
  128.                       Giark
  129.                                            joehick@golden.net
  130.                              http://www.golden.net/~joehick/fbn/index.html
  131.      ______  ______    _____  .------------------------------------------.
  132.     / ____/ / __  /   / ___ \ !     AMOS games, utilities, demos, etc.   !
  133.    / /__   / /_/ /   / /  / / !                                          !
  134.   / ___/  / ___  |  / /  / /  !       CyberSpace BBS (519)579-0072       !
  135.  / /     / /__/ /  / /  / /   !     on A2000 060/50MHz (519)579-0173     !
  136. /_/     /______/  /_/  /_/    !                                          !
  137.    Fly By Nite Videe-Oh!      !  FBN Amiga 500 020 14MHz 1C/5F RAM 3.1OS !
  138.          IAPA Member          `------------------------------------------'
  139.